export default class gameover extends Laya.Script {
    // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    owner=this.owner as Laya.Sprite;
    fei=null;
    e=null;
    btn_start=null;
    constructor() { super(); }
    onAwake(){
        this.fei=this.owner.getChildByName("fei");
        this.e=this.owner.getChildByName("e");
        this.btn_start=this.owner.getChildByName("btn_start")
        this.btn_start.on(Laya.Event.CLICK,this,function(){
            this.owner.visible=false;
            Laya.stage.event("start")
        })
        Laya.stage.on("gamerover",this,function(){
            this.owner.visible=true;
        })
        Laya.stage.on("gamerover1",this,function(){
            this.fei.visible=true;
            this.e.visible=false;
        })
        Laya.stage.on("gamerover2",this,function(){
            this.fei.visible=false;
            this.e.visible=true;
        })
    }
}